/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainFrame.java
 *
 * Created on 2011-4-21, 15:43:36
 */
package com.iduxs.collect.frame.style2;

import com.iduxs.collect.frame.style2.collect.StandardPanel;
import com.iduxs.collect.frame.system.SystemSettingPanel;

/**
 *
 * @author Administrator
 */
public class MainFrame extends javax.swing.JFrame {

    private SystemSettingPanel systemSettingPanel;

    /** Creates new form MainFrame */
    public MainFrame() {
        System.out.println(System.getProperty("user.dir"));
        initComponents();
        //add by dabing can get JFrame any time
        SystemManager.getInstance().register("MainFrame", this);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        buttonGroup1 = new javax.swing.ButtonGroup();
        mainTabs = new javax.swing.JTabbedPane();
        jToggleButton1 = new javax.swing.JToggleButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jCollect = new javax.swing.JMenu();
        iStandard = new javax.swing.JMenuItem();
        iManual = new javax.swing.JMenuItem();
        jAide = new javax.swing.JMenu();
        iBatchGenerate = new javax.swing.JMenuItem();
        iUpdateFictionInfo = new javax.swing.JMenuItem();
        jSetting = new javax.swing.JMenu();
        iSystemSetting = new javax.swing.JMenuItem();
        iCategories = new javax.swing.JMenuItem();
        iGenerateSetting = new javax.swing.JMenuItem();
        iImageSetting = new javax.swing.JMenuItem();
        iTextAdvertise = new javax.swing.JMenuItem();
        iReplace = new javax.swing.JMenuItem();
        jRule = new javax.swing.JMenu();
        iRuleManager = new javax.swing.JMenuItem();
        jWindow = new javax.swing.JMenu();
        jHelp = new javax.swing.JMenu();
        iHelp = new javax.swing.JMenuItem();
        iLog = new javax.swing.JMenuItem();
        iCheckUpdate = new javax.swing.JMenuItem();
        iAbout = new javax.swing.JMenuItem();
        iRegister = new javax.swing.JMenuItem();

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("数据采集器");
        setBounds(new java.awt.Rectangle(170, 130, 0, 0));

        jToggleButton1.setText("jToggleButton1");

        jCollect.setText("采集");

        iStandard.setText("标准采集模式");
        iStandard.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iStandardActionPerformed(evt);
            }
        });
        jCollect.add(iStandard);

        iManual.setText("手动控制模式");
        iManual.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iManualActionPerformed(evt);
            }
        });
        jCollect.add(iManual);

        jMenuBar1.add(jCollect);

        jAide.setText("辅助");

        iBatchGenerate.setText("批量生成");
        jAide.add(iBatchGenerate);

        iUpdateFictionInfo.setText("更新小说信息");
        jAide.add(iUpdateFictionInfo);

        jMenuBar1.add(jAide);

        jSetting.setText("设置");

        iSystemSetting.setText("基本设置");
        iSystemSetting.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iSystemSettingActionPerformed(evt);
            }
        });
        jSetting.add(iSystemSetting);

        iCategories.setText("分类对应");
        iCategories.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iCategoriesActionPerformed(evt);
            }
        });
        jSetting.add(iCategories);

        iGenerateSetting.setText("生成设置");
        iGenerateSetting.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iGenerateSettingActionPerformed(evt);
            }
        });
        jSetting.add(iGenerateSetting);

        iImageSetting.setText("图片设置");
        jSetting.add(iImageSetting);

        iTextAdvertise.setText("文字广告");
        jSetting.add(iTextAdvertise);

        iReplace.setText("过滤替换");
        jSetting.add(iReplace);

        jMenuBar1.add(jSetting);

        jRule.setText("规则");

        iRuleManager.setText("采集规则管理");
        jRule.add(iRuleManager);

        jMenuBar1.add(jRule);

        jWindow.setText("窗口");
        jMenuBar1.add(jWindow);

        jHelp.setText("帮助");

        iHelp.setText("帮助内容");
        jHelp.add(iHelp);

        iLog.setText("查看日志");
        jHelp.add(iLog);

        iCheckUpdate.setText("检查更新");
        jHelp.add(iCheckUpdate);

        iAbout.setText("关于我们");
        jHelp.add(iAbout);

        iRegister.setText("软件注册");
        jHelp.add(iRegister);

        jMenuBar1.add(jHelp);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainTabs, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(mainTabs, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void iStandardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iStandardActionPerformed
        System.out.println("iStandardActionPerformed");
//        NewJPanel3 jp = new NewJPanel3();
//        mainTabs.addTab("NewJPanel3", jp);
//        mainTabs.setSelectedComponent(jp);
        StandardPanel sp=new StandardPanel();
        mainTabs.addTab("标准采集模式", sp);
        mainTabs.setSelectedComponent(sp);
    }//GEN-LAST:event_iStandardActionPerformed

    private void iManualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iManualActionPerformed
    }//GEN-LAST:event_iManualActionPerformed

    private void iSystemSettingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iSystemSettingActionPerformed
        settingActionPerformed(evt);
    }//GEN-LAST:event_iSystemSettingActionPerformed

    private void iCategoriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iCategoriesActionPerformed
        settingActionPerformed(evt);
    }//GEN-LAST:event_iCategoriesActionPerformed

    private void iGenerateSettingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iGenerateSettingActionPerformed
        settingActionPerformed(evt);
    }//GEN-LAST:event_iGenerateSettingActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
    
    private void settingActionPerformed(java.awt.event.ActionEvent evt) {
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JMenuItem iAbout;
    private javax.swing.JMenuItem iBatchGenerate;
    private javax.swing.JMenuItem iCategories;
    private javax.swing.JMenuItem iCheckUpdate;
    private javax.swing.JMenuItem iGenerateSetting;
    private javax.swing.JMenuItem iHelp;
    private javax.swing.JMenuItem iImageSetting;
    private javax.swing.JMenuItem iLog;
    private javax.swing.JMenuItem iManual;
    private javax.swing.JMenuItem iRegister;
    private javax.swing.JMenuItem iReplace;
    private javax.swing.JMenuItem iRuleManager;
    private javax.swing.JMenuItem iStandard;
    private javax.swing.JMenuItem iSystemSetting;
    private javax.swing.JMenuItem iTextAdvertise;
    private javax.swing.JMenuItem iUpdateFictionInfo;
    private javax.swing.JMenu jAide;
    private javax.swing.JMenu jCollect;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JMenu jHelp;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jRule;
    private javax.swing.JMenu jSetting;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JMenu jWindow;
    private javax.swing.JTabbedPane mainTabs;
    // End of variables declaration//GEN-END:variables
}
